import Vue from "vue"
import Router from "vue-router"
Vue.use(Router);

export default new Router({
    mode: "history", //后端支持可开
    scrollBehavior: () => ({
        y: 0
    }),
    routes: [{
        path: "/",
        name: "index",
        component: () => import("@/views/index"),
        meta: {
            title: "首页"
        }
    }, {
        path: "/button",
        name: "button",
        component: () => import("@/views/button"),
        meta: {
            title: "button",
            desc: "按钮"
        }
    }, {
        path: "/dialog",
        name: "dialog",
        component: () => import("@/views/dialog"),
        meta: {
            title: "dialog",
            desc: "对话框"
        }
    }, {
        path: "/popup",
        name: "popup",
        component: () => import("@/views/popup"),
        meta: {
            title: "popup",
            desc: "弹出框"
        }
    }]
})